<?php

declare(strict_types=1);

namespace App\Entities;

use Illuminate\Foundation\Auth\User as AuthUser;

class CleanerModel extends AuthUser
{
    public const PROVIDER = '马鞍山裕米企业管理服务有限公司';

    public const GENDER_MALE   = 1;
    public const GENDER_FEMALE = 2;

    public const STATUS_DEPART = 3;   // 离职
    public $timestamps         = false;

    protected $table = 'cleaners';

    //保洁员 auth 调用
    public function getAuthPassword()
    {
        return $this->password;
    }

    public static function getCleanerByPhone($phone)
    {
        return self::where('phone', $phone)->first();
    }
}
